layui.use(['element', 'layer', 'layuimini', 'jquery', 'jquery_cookie'], function () {
    var $ = layui.jquery,
        layer = layui.layer,
        $ = layui.jquery_cookie($);

    // 菜单初始化
    $('#layuiminiHomeTabIframe').html('<iframe width="100%" height="100%" frameborder="0"  src="welcome"></iframe>')
    layuimini.initTab();


    $(".login_out").click(function () {

        //弹出提示框询问用户
        layer.confirm("确定退出系统？", {icon: 3, title: '系统提示'}, function (index) {
            //关闭询问层
            layer.close(index);

            //清空cookie
            $.removeCookie("userIdStr", {domain: "localhost", path: "/crm"});
            $.removeCookie("userIdStr", {domain: "localhost", path: "/crm"});
            $.removeCookie("userIdStr", {domain: "localhost", path: "/crm"});

            //跳转页面
            window.parent.location.href = ctx + "/index";


        });
    });
});